package com.li.test.model2;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Model2Controller {
    @Autowired
    RabbitTemplate rabbitTemplate;
    @GetMapping("/fanout")
    public String fanout(){
        rabbitTemplate.convertAndSend("fanout1",null,"1-1-N分发交换机模型测试");
        return "交换机1-1-N测试成功";
    }
}
